home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / NullPointerException.java < prev    next >
Text File  |  1998-09-22  |  2KB  |  59 lines

  1. /*
  2.  * @(#)NullPointerException.java    1.12 98/07/01
  3.  *
  4.  * Copyright 1995-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.lang;
  16.  
  17. /**
  18.  * Thrown when an application attempts to use <code>null</code> in a 
  19.  * case where an object is required. These include: 
  20.  * <ul>
  21.  * <li>Calling the instance method of a <code>null</code> object. 
  22.  * <li>Accessing or modifying the field of a <code>null</code> object. 
  23.  * <li>Taking the length of <code>null</code> as if it were an array. 
  24.  * <li>Accessing or modifying the slots of <code>null</code> as if it 
  25.  *     were an array. 
  26.  * <li>Throwing <code>null</code> as if it were a <code>Throwable</code> 
  27.  *     value. 
  28.  * </ul>
  29.  * <p>
  30.  * Applications should throw instances of this class to indicate 
  31.  * other illegal uses of the <code>null</code> object. 
  32.  *
  33.  * @author  unascribed
  34.  * @version 1.12, 07/01/98
  35.  * @since   JDK1.0
  36.  */
  37. public
  38. class NullPointerException extends RuntimeException {
  39.     /**
  40.      * Constructs a <code>NullPointerException</code> with no detail message.
  41.      *
  42.      * @since   JDK1.0
  43.      */
  44.     public NullPointerException() {
  45.     super();
  46.     }
  47.  
  48.     /**
  49.      * Constructs a <code>NullPointerException</code> with the specified 
  50.      * detail message. 
  51.      *
  52.      * @param   s   the detail message.
  53.      * @since   JDK1.0
  54.      */
  55.     public NullPointerException(String s) {
  56.     super(s);
  57.     }
  58. }
  59.